<template>
	<view class="rules">
		<view class="content">
			<text>{{article}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				article:''
			};
		},
		onLoad:function(option){
			console.log("rulesOption---------------------->",option)
			this.getRules(option)
		},
		methods:{
			getRules:function(option){
				let params = {}
				if(option.rules==2){
					params = {
						title:'优惠券使用规则'
					}
				}else{
					params = {
						title:'积分使用帮助'
					}
				}
				this.$postApi(this.$path.GET_RULES_LIST,params).then(res => {
					console.log("积分协议使用规则返回-------------->",res.data)
					if(res.data.success){
						let list = res.data.data.list[0]
						this.title = list.title
						this.article = list.content
					}else{
						
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.rules{
		padding: 0;
		font-size: 30upx;
		min-height: 100%;
	}
	.content{
		padding: 50upx;
		line-height: 55upx;
	}
</style>
